<template>
  <view class="container">
    <view class="courierAddress u-flex-center-sb u-plr30 borderRadius" style="margin: 30rpx 0;">
      <view class="leftAddress u-flex-center">
        <text class="iconfont u-font44" style="color: #FF721B;">&#xe64c;</text>

        <!-- 有地址 -->
        <view class="u-font30 u-ml20 u-flex-column-start" v-if="value.address">
          <view class="u-flex-center u-font32">
            <view class="lname u-font32">
              <!-- <text>收货人：</text> -->
              <text>{{value.realName}}</text>
            </view>
            <text class="u-ml20" v-if="value.mobile">{{value.mobile}}</text>
            <text class="u-ml20" v-if="value.phone">{{value.phone}}</text>
          </view>
          <view class="u-font28 u-AAAAAA">
            <!-- <text>收货地址：</text> -->
            <text>{{value.address}}</text>
          </view>
        </view>
        <!-- 默认没有地址 -->
        <view class="u-font30 u-ml20" v-else>
          暂无收货地址~
          <view class=" u-AAAAAA u-mt5">
            立即添加收货地址
          </view>
        </view>
      </view>
    </view>

  </view>
</template>

<script>
  export default {
    props: {
      link: {
        type: Boolean,
        default: true
      },
      value: {
        type: Object,
        default: function() {
          return {}
        }
      },
      third: {
        type: Boolean,
        default: false
      }
    },
    data() {
      return {

      }
    },
    methods: {
      chonseAddress() {
        if (this.link) {
          uni.navigateTo({
            url: '/pages/user/address/addressList'
          })
        }
      }
    }
  }
</script>

<style lang="scss">
  .courierAddress {
    background-color: #fff;
    padding: 36rpx 30rpx;
  }
</style>
